package com.huluobo.a2111douyindemo.adapter;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.huluobo.a2111douyindemo.R;
import com.huluobo.a2111douyindemo.utils.ImageLoader;
import com.huluobo.mvvm_base.mvvm.bean.GetLikeVideoBeanResult;

import java.util.List;

/**
 * Created by LC on 2024/3/13.
 */
public class WorkAdapter extends BaseQuickAdapter<GetLikeVideoBeanResult.GetLikeVideoBean, BaseViewHolder> {
    public WorkAdapter(@Nullable List<GetLikeVideoBeanResult.GetLikeVideoBean> data) {
        super(R.layout.item_work, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder baseViewHolder,
                           GetLikeVideoBeanResult.GetLikeVideoBean getLikeVideoBean) {
        baseViewHolder.setText(R.id.item_work_tv, getLikeVideoBean.getAuthname());
        ImageLoader.getInstance().loadImage(getContext(), getLikeVideoBean.getVideomainimg(),
                baseViewHolder.getView(R.id.item_work_iv));
    }
}
